function SearchWebMatrix($WebMatrixRegistry)
{
    $found = $FALSE;
 
    if (test-path $WebMatrixRegistry)
    {
        $entryProperties = Get-ItemProperty -path $WebMatrixRegistry
        
        $webMatrixVersion = New-Object System.Version($entryProperties.Version.ToString());
        $minVersion = New-Object System.Version("7.1.0999.01");
 
        if($webMatrixVersion -ge $minVersion)
        { 
            $found = $TRUE;
        }
    }
 
   $found;
}
 
function SearchAllWebMatrix()
{
    #32 bits
    $found =  SearchWebMatrix -WebMatrixRegistry 'HKLM:SOFTWARE\Microsoft\WebMatrix\';   
    if($found) { return $found; }
   
    #Wow folder, 64 bits
    $found =  SearchWebMatrix -WebMatrixRegistry 'HKLM:SOFTWARE\Wow6432Node\Microsoft\WebMatrix\';   
     
    return $found;
}
 
return SearchAllWebMatrix